
#pragma once

#include <math.h>

#include "vector3.h"
#include "matrix4.h"

struct quaternion
{
	float x, y, z, w;
};

__declspec(dllexport) void quat_create(float x, float y, float z, float w, struct quaternion* q_out);
__declspec(dllexport) void quat_create_vector3(const struct vector3* vec, float scalar, struct quaternion* q_out);
__declspec(dllexport) void quat_create_axisangle(const struct vector3* axis, float angle, struct quaternion* q_out);
__declspec(dllexport) void quat_create_rotmatrix(const struct matrix4* matrix, struct quaternion* q_out);
__declspec(dllexport) void quat_create_yawpitchroll(float yaw, float pitch, float roll, struct quaternion* q_out);
__declspec(dllexport) void quat_add(const struct quaternion* q1, const struct quaternion* q2, struct quaternion* q_out);
__declspec(dllexport) void quat_concat(const struct quaternion* q1, const struct quaternion* q2, struct quaternion* q_out);
__declspec(dllexport) void quat_conjugate(const struct quaternion* q_in, struct quaternion* q_out);
__declspec(dllexport) void quat_div(const struct quaternion* q1, const struct quaternion* q2, struct quaternion* q_out);
__declspec(dllexport) void quat_dot(const struct quaternion* q1, const struct quaternion* q2, float* f_out);
__declspec(dllexport) void quat_equals(const struct quaternion* q1, const struct quaternion* q2, int* result);
__declspec(dllexport) void quat_inverse(const struct quaternion* q, struct quaternion* q_out);
__declspec(dllexport) void quat_len(const struct quaternion* q, float* f_out);
__declspec(dllexport) void quat_lensqr(const struct quaternion* q, float* f_out);
__declspec(dllexport) void quat_lerp(const struct quaternion* q1, const struct quaternion* q2, float amt, struct quaternion* q_out);
__declspec(dllexport) void quat_mult(const struct quaternion* q1, const struct quaternion* q2, struct quaternion* q_out);
__declspec(dllexport) void quat_mult_scale(const struct quaternion* q, float scale, struct quaternion* q_out);
__declspec(dllexport) void quat_scale(const struct quaternion* q, float scale, struct quaternion* q_out);
__declspec(dllexport) void quat_negate(const struct quaternion* q, struct quaternion* q_out);
__declspec(dllexport) void quat_normalize(const struct quaternion* q, struct quaternion* q_out);
__declspec(dllexport) void quat_slerp(const struct quaternion* q1, const struct quaternion* q2, float amt, struct quaternion* q_out);
__declspec(dllexport) void quat_subt(const struct quaternion* q1, const struct quaternion* q2, struct quaternion* q_out);